package com.huhm.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @PackageName: com.huhm.demo.controller
 * @ClassName: DemoController
 * @Description:
 * @author: hgx61
 * @date: 2024/7/2 16:15
 */


@Slf4j
@RestController
public class DemoController {


  @GetMapping("/hello")
  public String hello() {
    return "hello";
  }

  @PostMapping("/sum")
  public Integer sum(int a,int b){
    log.info("a+b={}",a+b);
    return a+b;
  }

}
